package com.zhhtech.zhh.ui.adapter

import com.bumptech.glide.Glide
import com.lxj.xpopup.util.SmartGlideImageLoader
import com.youth.banner.adapter.BannerImageAdapter
import com.youth.banner.holder.BannerImageHolder

val mSmartGlideImageLoader = SmartGlideImageLoader()

class SyBannerImageAdapter<T>(
    datas: MutableList<T>,
    private val funUrl: (T) -> Any
) : BannerImageAdapter<T>(datas) {
    override fun onBindView(holder: BannerImageHolder, data: T, position: Int, size: Int) {
        Glide.with(holder.itemView)
            .load(funUrl.invoke(data))
            .into(holder.imageView)
    }
}